Synthesis of Gemini-type imidazoline quaternary ammonium salt using by-product fatty acid as corrosion inhibitor for Q235 steel

Gemini-type imidazoline quaternary ammonium salt is a new type of environmentally friendly corrosion inhibitor has been widely used in engineering materials. However, most of them are hazardous/toxic compounds derived from petroleum-based products, which did harm to environment. In this work, an environmentally friendly Gemini-shaped imidazoline quaternary ammonium salt corrosion inhibitor (G211) was synthesized using cheap fatty acid recycled from dimer acid industry as feedstock. The corrosion inhibition effects of G211 on Q235 steel in 1 M HCl solution were investigated through weight loss experiments, potential polarization curves, and alternating current impedance spectroscopy experiments. The results show that the inhibition rate of G211 as a mixed-type inhibitor is up to 94.4% and the concentration drop as low as 500 ppm at 25 ℃. The adsorption of G211 on Q235 surface follows Langmuir adsorption isothermal curve. The chemical composition of the Q235 steel surface was analyzed through scanning electron microscopy (SEM) and X-ray photoelectron spectroscopy (XPS). Furthermore, the possible corrosion inhibition mechanism of G211 on the surface of Q235 steel is proposed. This article not only presents an outstanding solution for safeguarding Q235 steel against corrosion but also introduces a feasible method for high-value utilization of monomer acid (MA).

Q235 steel is cut into 10 × 10 × 0.5 mm slats.Before the corrosion test, scrape the working surface with 800 and 1200 grade sandpaper, and then wash and degrease the surface iron filings with deionized water and acetone.The chemical composition of Q235 is given in Table 1.

Synthesis of G211
G211 was synthesized through a three-step reaction, and the synthetic processes are depicted in Scheme I.
Boric acid was selected as catalyst.First, MA (0.5 mol), hydroxyethyl ethylenediamine (0.7 mol) catalyst (0.8 g), xylene(65.03g) were added to a three-necked flask equipped with a condenser and stirrer, heated into 160 ℃ for 6 h, the system was heated to 230 ℃ and it was held for 6 h.HEAI was obtained by distillation under reduced pressure to remove xylene and excess hydroxyethyl ethylenediamine.Subsequently, 0.5 mol 2GE and 15 ml methanol were added to the reactor.The system was kept at 85 ℃ for 3 h.G211 was obtained by distillation under reduced pressure to remove methanol.

Measurement methods
The corrosion rate and corrosion inhibition performance of Q235 steel was evaluated by weight loss experiment.Q235 steel ,cut and dried, immersed in 1 M HCl solution at 25-65 ℃, with different concentrations of G211 corrosion inhibitor.After a 6 h exposure under these conditions, the alterations in the mass of the Q235 steel were recorded.The corrosion rate can be calculated using Eq.(1) 26 , and the corrosion inhibition rate can be calculated using Eq.(2) 27 .
Table 1.Chemical composition of Q235 steel.Conducting electrochemical tests utilizing the CS2350H three-electrode electro-chemical workstation to evaluate the corrosion inhibition effectiveness.The Q235 steel functions as the working electrode, whereas the platinum electrode and saturated calomel electrode serve as the auxiliary and reference electrodes, respectively.The test area is 1 cm −2 .Potentiodynamic polarization curve (PDP) test was were obtained with a 1 mV/s scanning rate from − 1.0 to 0.2 V.The corrosion inhibition rate can be calculated using Eq.(3) 28 .Where I corr,0 and I corr are corrosion current densities in solution without and with inhibitor, respectively.
Electrochemical impedance spectroscopy (EIS) tests were performed using a 10 mV AC disturbance to measure the amplitude, covering a frequency range from 100 kHz down to 0.05 Hz.And the corrosion inhibition rate can be calculated using Eq. ( 4) 29 .R ct,0 and R ct are the charge transfer resistance values without and with inhibitor, respectively.
Applying the Langmuir adsorption isotherm model, as described in Eq. ( 5) 30 , the connection between the inhibitor's adsorption capacity at equilibrium and its concentration was established.By employing the Langmuir isotherm equation, the Gibbs free energy of adsorption (∆G ads ) was calculated via Eq.( 6) 31 after the K ads have been calculated.And other thermodynamic parameters (∆H ads , ∆S ads ) are calculated by Eq. ( 7) 32 .

Characterization
Fourier transform infrared (FT-IR) spectroscopy was performed utilizing a Bruker spectrophotometer (VERTEX 80 V) equipped with attenuated total reflection (ATR).The range of wavenumber was 4000-650 cm −1 and 32 scans per spectrum were collected with the resolution of four wavenumbers. 1H NMR spectroscopy was performed by a Bruker Biospin NMR apparatus (AVANCE III HD) with CDCl 3 as solvent.SEM-EDS text was conducted with the FEI Quanta 200 scanning electron microscope, and XPS text was studied by a Shimadzu AXIS Ultra DLD X-ray photoelectron spectrometer with Al Kα (1486.6 eV) radiation.Before these text, Q235 steel samples www.nature.com/scientificreports/were submerged in a 1 M HCl solution, with the addition of a 0 ppm and 500 ppm concentration of the G211 corrosion inhibitor.Afterwards, the samples were retrieved, and their surface were delicately cleaned and dried.

Theoretical study
Considering that G211 can be ionized in solution, quaternary ammonium ion is used for calculation.After establishing the 3D configuration of the G211 cation.The initial configuration of the molecule was calculated using Gaussian 09W software and B3LYP/6-31G (d,p) base group by density functional theory (DFT) method, and the structure was optimized using water as solvent 33,34 .The results were visualized by Multiwfn 35 and VMD software.

Structural characterizations
The FT-IR spectra of MA, HEAI and G211 are shown in Fig. 1a.Neither the HEAI nor the G211 spectra exhibited the -COOH peak and the presence of the C=N 36 bond at 1610 cm −1 in the spectrum of HEAI prove that we have successfully synthesized HEAI.In the G211 spectrum, the pronounced absorption peaks of C-O-C bond at 1066 cm −1 signifies the successful incorporation of 2GE into the HEAI structure, thereby confirming the synthesis of Gemini quaternary ammonium salts, what more, the absorption peak of C=N bond at 1608 cm −1 also appears in the G211 spectrum.
The 1 H NMR spectra of the relevant compounds are depicted in Fig. 1b.In 1 H NMR spectra, the -COOH peak was not observed in either the HEAI or the G211 spectra, and the appearance of the imidazoline ring (3.3, and 3.9 ppm) in HEAI spectrum implies the successful reaction between MA and hydroxyethyl ethylenediamine.In the G211 spectrum, the appearance of C-O-C and -CH-bond at 3.5, and 3.9 ppm implies the successful addition between HEAI and 2GE, and in G211 spectrum, it still shows the peak of imidazoline ring(3.3,and 3.9 ppm).These results demonstrated that G211 have been synthesized successfully.

Corrosion inhibition performance
The corrosion rates and inhibition efficiencies on Q235 steel under various G211 corrosion inhibitor concentrations and temperatures through weight loss text are depicted in Table 2.
G211 demonstrates effective corrosion inhibition properties across a wide range of concentrations and temperatures.As the concentration of G211 increases, the inhibition efficiency steadily improves, indicating that more G211 inhibitor molecules are adsorbed on the metal surface, reducing the contact area between Q235 and  www.nature.com/scientificreports/corrosive media such as acidic ions, thereby reducing the corrosion rate.It shows that Fe in the blank sample is more prone to electron loss, entering the solution as Fe 2+ or Fe 3+37 , as the temperature rises, corrosion becomes more pronounced, leading to a significant increase in weight loss and an accelerated corrosion rate for Q235.However, when G211 corrosion inhibitor is introduced, the weight loss remains relatively stable.With increasing temperature, the inhibition efficiency gradually improves.This could be attributed to elevated temperatures enhancing the thermal motion of inhibitor molecules, facilitating the formation of coordination bonds between the metal surface and the inhibitor molecules.This results in strong inhibitor attachment to the metal surface, making it challenging to desorb once the bond is formed.Additionally, this observation suggests that the adsorption of G211 corrosion inhibitor on the metal surface primarily involves chemical adsorption, characterized by strong and irreversible bonding, which further confirms that G211 does not desorption from the metal surface as temperature increases 38 .
The outcomes from the PDP test shown in Fig. 2 reveal that following the inclusion of the G211 inhibitor, there is a noticeable shift towards lower current density in both the cathodic and anodic curves.This implies that G211 possesses the capability to inhibit the electrochemical reactions taking place at both the anode and cathode.Specifically, the cathodic curve shifts to the left while maintaining its original shape, signifying that the introduction of G211 impacts the reaction activity without modifying the underlying reaction mechanism of the metal electrodes 39 .Moreover, upon the addition of G211, the polarization curve shifts leftwards, signifying that even a small quantity of G211 can proficiently impede charge transfer, resulting in a reduction in current density.Additionally, the curve situated in the anodic region rapidly reaches a plateau region as the 'potential increases' 40 , in this region, as the potential increases, the corrosion current density undergoes a steep ascent, and the inhibitor molecules desorb from the surface of Q235.Within the anodic area, as the polarization potential escalates, the PDP curve for G211-added solutions aligns almost parallel to the curve without G211, indicating a complete desorption of the inhibitor molecules 41 .This phenomenon characterizes interfacial inhibitors, wherein the molecules engage in a dynamic process of adsorption and desorption on the metal surface to safeguard it against corrosion.As the anodic potential intensifies, it facilitates the dissolution of the metal anode, consequently disturbing the adsorption-desorption equilibrium of the inhibitor molecules.When the rate of desorption exceeds that of adsorption, the metal's Icorr increases.Moreover, with an escalation in the inhibitor concentration, the desorption potential shifts towards the anode, highlighting that a higher dosage of G211 can fortify a more enduring adsorption on Q235 steel.
Table 3 shown that following the incorporation of the G211 inhibitor, the range of Ecorr variation consistently remains below 85 mV 42 , which indicates that G211 operates as a mixed-type inhibitor.After adding G211 into  the solution, noticeable changes occur in the slopes of both the cathodic and anodic Tafel curves, with a more pronounced alteration observed in the anodic slope.This indicates that upon introducing G211, adsorption occurs on the surface of Q235, effectively disrupting the reaction sites on the metal surface 43 , without altering the anodic reaction mechanism.Consequently, it reduces the current passing through the metal surface, thereby achieving the inhibitive effect.In the control sample, the Icorr reached 562.58 μA/cm 2 , signifying corrosion on the surface.Upon adding a concentration of 500 ppm, the Icorr decreased to 36.53 μA/cm 2 , significantly reducing the anodic dissolution.The results from the PDP test demonstrate that upon the addition of G211, inhibitor molecules adhere to the metal surface, occupying reaction sites and providing protection to the metal index.
The results of the EIS test for Q235 steel dipped in 1 M HCl solution are plotted using Nyquist and Bode graphs in the absence and presence of various concentrations of G211, as portrayed in Fig. 3.In Fig. 3a the radius of the semicircular curve depicted in the Nyquist plot rises in proportion to the concentration of G211 corrosion inhibitor.Upon reaching a concentration of 500 ppm, the impedance value attains to the max.The fitting outcome can be approximated as a distorted semicircle, suggesting that the impedance behavior of the Q235 steel electrode deviates from ideal behavior and exhibits a 'dispersion effect' .This phenomenon is commonly attributed to the non-uniformity of active sites on the metal surface or disparities in conductivity.The results of the Bode plot are depicted in Fig. 3b and c, with the addition of G211 corrosion inhibitor, a time constant is observed, indicating that the electrochemical corrosion process is mainly controlled by the charge transfer step 44 at the interface.It is highly likely that this inhibitor functions as an adsorption-type corrosion inhibitor, aligning with the outcomes obtained from the PDP test.Therefore, based on the Nyquist and Bode plots obtained from the experiment, Fig. 4 is drawn as the equivalent circuit of G211 corrosion inhibitor for Q235 steel in 1 M HCl solution, and it is fitted to the experimental data.The calculation results, obtained using Eq. ( 4), are presented in Table 4.
Usually, the capacitive reactance arc that appears in the first quadrant is caused by the parallel connection of resistance and capacitance 45 .In the equivalent circuit, a constant phase element (CPE) is introduced to characterize the 'dispersion effect' .Moreover, from the Nyquist plot, it can be seen that there is a resistance for solution in the electrolytic cell 5. Based on the above analysis, the equivalent circuit shown in Fig. 4 was drawn as the equivalent circuit formed between the G211 corrosion inhibitor and the Q235 metal surface, and it was fitted to the experimental data.As shown in Fig. 4, R s is the solution resistance, R ct is the charge transfer resistance, and CPE is the constant phase Angle element, which contains two parameters, Y 0 and n, that is, Y 0 is the parameter of CPE, and n is the dispersion.Table 4 shows that for the G211 corrosion inhibitor, as the concentration increases, R ct increases, indicating that more and more G211 corrosion inhibitor molecules replace the water molecules on the metal surface.The structure of the G211 corrosion inhibitor molecule contains two N + ions, which facilitate electrostatic adsorption on the Q235 steel surface.With an increase in the number of molecules, the shielding effect intensifies, leading to a gradual rise in EI%.When the concentration of the corrosion inhibitor is 500 ppm, the corrosion inhibition efficiency reaches the optimal value of 94.42%.Generally, when there is a dispersion effect on the electrode surface, the n value is always between 0.5 and 1 46 , which is consistent with fitting results.It can also be seen from Table 4 that with the addition of G211, the value of Rs gradually decreases.It shows that the addition of G211 can prevent the surface corrosion of the electrode, protect its basic characteristics, and keep a good charge transfer, which also corresponds to the change of the EI%.The trend is in agreement with the results of the weight loss test and the PDP test.

Langmuir adsorption isotherm
The Langmuir adsorption isotherm model was used to fit the data and it was found that the plot of C/θ versus C was linear, as shown in Fig. 5.At every temperature, the correlation coefficients (R i 2 ) of both reached 0.999, Table4.Fitting parameters and corrosion inhibition rate of different concentrations of G211.indicating that the adsorption of G211 corrosion inhibitor on Q235 surface followed the Langmuir adsorption isotherm model.Moreover, the calculated values of each ∆G ads were showed in Table 5 and ∆Gads were all negative, indicating that the adsorption process of G211 corrosion inhibitor on Q235 steel surface was spontaneous.When the absolute value of ∆G ads was less than 20 kJ/mol, it could be considered that the corrosion inhibitor molecules mainly physically adsorbed on the metal surface by electrostatic interaction.When the absolute value of ∆G ads was greater than 40 kJ/mol, it could be considered that the corrosion inhibitor molecules were mainly chemically adsorbed on the metal surface by forming coordination bonds.The experimental ∆G ads value falls within this range, suggesting that the adsorption of G211 on the Q235 surface is the synergistic outcome of two distinct adsorption modes.

Surface analysis
The surface morphology changes of Q235 were observed by SEM test.Figure 6a1, a2 illustrates the surface of Q235 steel without the addition of G211 after soaking for 7 days, which has undergone serious corrosion, appearing extremely rough and loose, and the traces of sandpaper polishing have become blurred.On the contrary, in Fig. 6b1, b2, the surface of the sample with the addition of 500 ppm G211 corrosion inhibitor was smoother and retained relatively complete scratches.This indicates that G211 corrosion inhibitor can stably exert corrosion inhibition effect under acidic conditions, forming a dense protective film on the steel surface by adsorption, effectively hindering the corrosion of Q235 steel by acidic medium.
In addition, the results of EDS text are displayed in Fig. 6a3, b3, which show that the Q235 steel in the blank sample was continuously oxidized, and the content of Fe was reduced to 57.4%, while the Contet of O on the surface increased significantly to 35.0%.The condition was attributed to the oxidation of Fe to Fe 2+ or Fe 3+ in Q235 steel under acidic conditions, resulting in more stable oxides.Compared with the blank sample, the content of Fe on surface of Q235 steel remained at a relatively high level of 81.1% after adding the G211 corrosion inhibitor, and the O generation was suppressed to some extent, to 6.0%.Based on the above analysis, the confirmed test results from EIS and PDP demonstrate the successful adsorption of G211 molecules onto the surface of Q235 steel, thereby offering protection against oxidation 47,48 .
Surface elemental analysis of Q235 steel at a G211 concentration of 500 ppm was further studied by XPS, and the results are displayed in Fig. 7a-e.Several elements, including C, N, O, and Fe, can be observed in the XPS spectrum.In wide spectra, the presence of N confirms that G211 has successfully adsorbed onto the surface of Q235 steel, aligning with the earlier test results.Four peaks appeared in the Fe 2p spectra, the component at 706.8 eV binding energy is attributed to the Fe in Q235 steel 30 while at 710.8 eV may related to ferric oxides like Fe 2 O 3 , Fe 3 O 4 , or FeOOH, the peak at 714.2 eV binding energy might be associated with FeCl 3 resulting from the testing environment, last peak at 724.4 eV was Fe 2p 1/2 49 .The O 1 s spectrum was deconvoluted into three peaks at 530.0, 531.9 and 533.3 eV, which correspond to O 2− , OH − and -O-bond respectively.The peaks at 530.0 and 531.9 eV are attributed to ferric oxides such as Fe 2 O 3 , Fe 3 O 4 , or FeOOH which are consistent with the Fe 2p spectrum, the -O-bond in the G211 molecule results in the appearance of a characteristic peak at 533.3 eV in the O 1 s spectrum, indicating that G211 has successfully adsorbed onto the metal surface.Three peaks emerged in the C 1 s spectrum at 288.7 eV (C-N + ), 286.3 eV (C-N/C=N) and 284.8 eV (C-C), the peak at the binding energy of 288.7 and 286.3 eV can be thought to be caused by the C and N elements in the G211 molecule.The two peaks that appeared in the N 1 s spectrum, corresponding to 401.5 eV (C-N + ), 400.4 eV (Fe-N) and 399.3 eV (C-N/C=N).The distinctive peak detected at 400.4 eV, signifying Fe-N, effectively confirms the existence of G211 inhibitor molecules on the surface of Q235.The results are consistent with the O 1 s and C 1 s spectrum, confirming the successful adsorption of G211 as a corrosion inhibitor on the surface of Q235 respectively 30,50 .

Quantum-chemical calculation
Density functional theory (DFT) is an important method to evaluate corrosion inhibition mechanism 51 .According to quantum chemical calculations, the results are shown in Fig. 8. Figure 8b shows the electrostatic potential (ESP) mappings on the van der Waals (vdW) surface of G211 quaternary ammonium cations, the positive pole region primarily concentrates on the red section.When G211 absorbs on Q235 steel, this particular area becomes susceptible as an electrophilic reaction attack site.The blue section, on the other hand, represents the negative pole region, which is more prone to attracting nucleophilic reagents for attack, when G211 absorbs, π electrons from Fe will attack this area.The charge density distribution of the molecular frontier orbitals of the G211 molecular compound shows that in the HOMO diagram, the charge density is most dense near the C-O-C bond, and the d orbital in the electronic orbital of Fe is not full, so the above-mentioned dense part of the charge distribution can provide π electrons for Fe, and there is a vacant d orbital in Fe, and the two can form a covalent bond.In the LUMO diagram, the charge density is mainly concentrated near N=C on the imidazoline ring, which can accept electrons from the Fe surface and form a feedback bond 49 .The results from the calculations of HOMO and LUMO align with the results obtained from ESP analysis.As a result, the corrosion inhibitor is adsorbed on the surface of Q235 steel, achieving the purpose of inhibiting corrosion 44,52 .

Possible corrosion inhibition mechanisms
Based on the results of electrochemical tests, surface morphology elemental analysis, and quantum calculations, the possible corrosion inhibition mechanism of G211 is discussed in this work, which is displayed in Fig. 9.It forms a protective film by adsorbing and bonding with Fe atoms, isolating the corrosive substances from the metal surface.This isolation impedes anodic dissolution and suppresses the deposition of hydrogen at the cathode.The adsorption of G211 onto the Q235 surface primarily occurs due to the existence of lone pairs of electrons in N and O atoms, interacting with the three-dimensional unoccupied orbitals in Fe.Additionally, the antibonding orbitals in G211 form feedback bonds with electrons in Fe.The bicyclic imidazoline ring structure in G211 further facilitates central adsorption.The solution environment contains a significant amount of Cl − .These ions can adsorb onto the iron surface, forming (FeCl − ) and generating a negative surface charge 49 , creating a negative surface charge.This promotes the physical adsorption of G211 cations onto the metal surface.Additionally, the structure of long-chain alkyls can hinder water from coming into contact with the metal, thereby achieving the corrosion inhibition purpose.

Conclusion
In this work, an environmentally friendly Gemini-shaped imidazoline quaternary ammonium salt G211 was synthesized using cheap MA, a by-product from dimer acid industry, as feedstock and as a corrosion inhibitor for Q235 in 1 M HCl solution.The results of the corrosion inhibition performance tests by chemical and electrochemical methods showed that the corrosion inhibition effect increased with the increase of G211 concentration in the solution.At a 500 ppm concentration, the corrosion inhibition efficiency at room temperature reached 94.4%.Moreover, the adsorption of G211 on the Q235 surface followed the Langmuir adsorption isotherm curve.
According to the thermodynamic parameters, the value of ∆Gads indicated that G211 adsorbed on the metal surface by physical and chemical adsorption.In addition, findings from SEM-EDS and XPS tests have conclusively shown that G211 efficiently adsorbed to the surface of Q235, providing protection against corrosion.The quantum calculation results showed that the imidazoline ring and C-O-C bond were the active sites of G211, 0.001 0.001 0.011 0.008 0.01 0.001 0.006 Scheme I. Synthesis route of G211.

Figure 2 .
Figure 2. PDP test of Q235 steel in 1 M HCl solution with various concentrations of G211.

Figure 3 .
Figure 3. EIS test of Q235 steel in 1 M HCl solution with various concentrations of G211.

Figure 4 .
Figure 4. Equivalent circuit for Q235 steel in 1 M HCl solution.

Figure 6 .
Figure 6.The SEM images and EDS results of Q235 steel after immersion of 7 days in 1 M HCl solution with (a) o ppm G211 and (b) 500 ppm G211.

Figure 8 .
Figure 8.The results of quantum chemical calculations: (a) the optimized geometry configurations, (b) ESP image, (c) E HOMO image and (d) E LUMO image of G211 cation.

Table 3 .
Electrochemical parameters of G211 obtained from polarization curves.

Table 5 .
Thermodynamic adsorption parameters of G211 corrosion inhibitor on Q235 steel surface in 1 M HCl solution at different temperatures.